#include <func.h>

int main(int argc,char* argv[]){
    ARGS_CHECK(argc,2);
    DIR* dir;
    dir=opendir(argv[1]);
    ERROR_CHECK(dir,NULL,"opendir");
    struct dirent* p;
    while(p=readdir(dir)){
        printf("%5s %d\n",p->d_name,p->d_type);
    }
    closedir(dir);
    return 0;
}